package com.example.demo.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.demo.dto.CommentWithGoodsDTO;
import com.example.demo.dto.CommentWithUserDTO;
import com.example.demo.entity.Comments;

import java.util.List;

/**
 * <p>
 * 评论模块 服务类
 * </p>
 */
public interface CommentsService extends IService<Comments> {
    CommentWithUserDTO addComment(Comments comment);
    List<Comments> getCommentsByUser(Integer userId);
    String deleteComment(Integer commentId);
    String updateComment(Comments comment);
    List<CommentWithUserDTO> getCommentsByGoods(Integer goodsId);

    IPage<CommentWithGoodsDTO> getCommentsWithGoodsByUser(Integer userId,
                                                          Page<CommentWithGoodsDTO> page,
                                                          String keyword);
}
